<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateDomainTable extends Migration {
	public function up() {
		//公告
		Schema::create( 'domain', function ( Blueprint $table ) {
			$table->bigIncrements( 'id' );
			$table->string( 'domain' )->comment( '域名' );
			$table->unsignedDecimal( 'price', 9, 2 )->comment( '价格' );
			$table->dateTime( 'reg_at' )->comment( '注册日期' );
			$table->dateTime( 'end_at' )->comment( '到期日期' );
			$table->string( 'city' )->default( '' )->comment( '地区' );
			$table->string( 'provider' )->default( '' )->comment( '接入商' );
			$table->string( 'icp_name' )->default( '' )->comment( '备案名称/建站记录' );
			$table->tinyInteger( 'icp_type' )->default( 0 )->comment( '备案性质 未备案0 个人1  企业2 事业单位3  其他'  );
			$table->boolean( 'status' )->default( true )->comment( '下架0 上架1' );
			$table->timestamps();
		} );

	}

	public function down() {
		Schema::dropIfExists( 'domain' );
	}
}
